Clean up syntax-table usage in xml.el
authorChong Yidong <cyd@gnu.org>
Wed, 4 Jul 2012 16:14:05 +0000 (00:14 +0800)
committerChong Yidong <cyd@gnu.org>
Wed, 4 Jul 2012 16:14:05 +0000 (00:14 +0800)
commiteea318f0ea8af96ec9dbe564c459227201e23700
tree28aef13f706f33e8419b90a4fa79535befd10661
parentd6202360090b191ded45a4321aefae53e8d1319c
Clean up syntax-table usage in xml.el

* xml.el (xml--parse-buffer): Use xml-syntax-table.
(xml-parse-tag): Likewise, and avoid changing entity tables.
(xml-syntax-table): Define from scratch, making sure not to give
x2000 and other Unicode spaces whitespace syntax, since those are
not spaces in XML.
(xml-parse-fragment): Delete unused function.
(xml-name-start-char-re, xml-name-char-re, xml-name-re)
(xml-names-re, xml-nmtoken-re, xml-nmtokens-re, xml-char-ref-re)
(xml-entity-ref, xml-pe-reference-re)
(xml-reference-re,xml-att-value-re, xml-tokenized-type-re)
(xml-notation-type-re, xml-enumeration-re, xml-enumerated-type-re)
(xml-att-type-re, xml-default-decl-re, xml-att-def-re)
(xml-entity-value-re): Use syntax references in regexps where
possible; no need to define inside a let-binding.
(xml-parse-dtd): Use xml-pe-reference-re.
(xml-entity-or-char-ref-re): New defconst.
(xml-parse-string, xml-substitute-special): Use it.
lisp/ChangeLog
lisp/xml.el
test/automated/xml-parse-tests.el